 
<!DOCTYPE html>
<html lang="en">
	<head>
    <link rel="stylesheet" type="text/css" href="chgpwd.css">
    <link rel="stylesheet" type="text/css" href="../com.atilax.frmwk/bootstrap/bootstrap.min.css">
    
    <script src="../com.atilax.frmwk/jquery-1.11.3.js"></script>
    <meta name="viewport"	content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=yes;" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
 <script src="../com.attilax/user/userService.jsp"></script>
  <script type="text/javascript" src="../com.attilax/core/core.js"></script>
  <script type="text/javascript" src="../com.attilax\jsbridge\dsl_jsb_v12qaf.js"></script>
    <script type="text/javascript" src="../com.attilax\cfg\approot_jsV4q329.jsp"></script>
 <script >
 hre_web_url="/DslAjaxJsbridgeServletV2";
 
 </script><script src="../com.attilax/web/req.js"></script>
 <script>
 //prj:gameagent

var apiurl="/wrmiServlet";
var import_base="../";
$ex_show_err_str=true;



 
$app_path="";   
app_path="";
$approot="";
$envi="java";
apiurl="/CommonServletV2";
$iocx_iner="com.attilax.ioc.Ioc4agent";
$iocx="com.attilax.ioc.Ioc4agent";
/*
    /wxb
    
    */
  
  threadLocalParamMap={};
var pathname=window.location.pathname;
var a=pathname.split("/");
//var /lime/cmsWechat/detail.html
var approot="/"+a[1];
if($envi=="java")
{
approot=$app_path;$iocx_iner="nonex";$iocx="nonex";$iocx="com.attilax.ioc.Ioc4agent";
}

console.log(" approot:"+approot);
 urole="agent";
 
 
 

    </script>
    <script src="../com.attilax/user/chgpwd.js"></script>
		<meta charset="utf-8" />
		<title>chg pwd</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<!-- head start-->
      
        <!-- head over-->
        <style>
          .control-label .required {
			    color: #e02222;
			    font-size: 14px;
			    font-weight: bold;
			    padding-left: 2px;
			}
			
			.col-xs-3 {
			width:38% !important;
			
				
			}
        
        </style>
	</head>

	<body>
		<div class="navbar navbar-default" id="navbar">
			<script type="text/javascript">
				try{ace.settings.check('navbar' , 'fixed')}catch(e){}
			</script>

			<!-- head start-->
	  
	        <!-- head over-->
		</div>

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<!-- head start-->
		       
		        <!-- head over-->

				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
							<a href="/" id="index_a">首页</a></li>
							
						</ul><!-- .breadcrumb -->

					</div>


<div class="panel panel-primary">
    <div class="panel-heading">
        <h3 class="panel-title">密码修改</h3>
    </div>
    <div class="panel-body">
       
					<div class="page-content">
					  <!-- msg start-->
				      
				        <!-- msg over-->
						
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
                                   <form id="" class="form-horizontal" action="${path}/cust/chpwd" method="post"  onSubmit="return false;">
								    <div class="form-body margin-top-20">
								        <div class="form-group">
								            <label class="col-xs-3 control-label"> &nbsp;&nbsp;&nbsp;用户：</label>
								            <div class="col-xs-5">
								                <input name="uid" type="text" class="form-control" id="uid" value="" readonly/>
								                <input type="hidden" id="customer_id" name="customer_id" value="${customer.customer_id}"/>
								            </div>
								        </div>
								        <div class="form-group">
								            <label class="col-xs-3 control-label"><span class="required"> * </span> 原密码：</label>
								            <div class="col-xs-5">
								                <input type="password" name="old_password" id="old_password" dataType="SafeString" msg="密码不符合安全规则" class="form-control" value="" placeholder="请输入原密码">
								            </div>
								        </div>
								        <div class="form-group">
								            <label class="col-xs-3 control-label"><span class="required"> * </span> 新密码：</label>
								            <div class="col-xs-5">
								                <input type="password" id="password" name="password"  class="form-control" placeholder="请输入密码">
								            </div>
								        </div>
								        <div class="form-group">
								            <label class="col-xs-3 control-label"><span class="required"> * </span> 重复新密码：</label>
								            <div class="col-xs-5">
								                <input type="password" name="password2" id="password2" class="form-control" placeholder="请再次输入新密码">
								            </div>
								        </div>
								         <div class="form-group noneline">
								            <label class="col-xs-3 control-label"></label>
								            <div class="col-xs-5">
								                <button id="" onclick="return checkSubmit();" class="btn btn-lxg btn-success"> 确认保存 </button>
								            </div>
								        </div>
								    </div>
								
								</form>

								
								</div><!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div>
			
    </div>
</div>

			

					</div><!-- /.page-content -->
				</div><!-- /.main-content -->

			</div><!-- /.main-container-inner -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<!-- menu start-->
       
        <!-- menu over-->
    <script type="text/javascript">
    function checkSubmit(){
    
       if(isNullStr($("#old_password").val())){
          $.dialog.alert('请输入原始密码');
          return ;
       }
       
       if(isNullStr($("#password").val())){
          $.dialog.alert('请输入新密码');
          return  false;
       }
       
       if(isNullStr($("#password2").val())){
          $.dialog.alert('请输入确认密码');
          return false;
       }
       
       var pwd = $("#password").val();
       var pwd2 = $("#password2").val();
       if(pwd.length<6||pwd.length>15){
          $.dialog.alert('对不起，新密码的长度为[6-15]位!');
          return false;
       }
       
       if(pwd2.length<6||pwd2.length>15){
          $.dialog.alert('对不起，确认密码的长度为[6-15]位!');
          return false;
       }
       
       if($("#password").val()!=$("#password2").val()){
          $.dialog.alert('对不起，两次输入密码不一致');
          return false;
       }
       
      if( $.dialog.confirm('你确定要提交数据吗？'))
	  {
		  
        //    $.dialog.tips('数据保存中...',600,'loading.gif');
            setTimeout(function(){
	         //  $('#form').submit();
			 clickx();
	        },500);
			return false;
		}
		return false;
    }
	
	
	
	
	 function clickx()
	{
	 
		try{
		var jsbrj=new	AtiJsBridge();
		var dsl="com.attilax.ioc.Ioc4agent.getBean(com.attilax.agent.AgtSrv.class).resetPwd('@old@','@new@')";
		dsl=dsl.replace("@old@",$("#old_password").val());
			dsl=dsl.replace("@new@",$("#password").val());
	//	jsbrj.method="post";
		var para={};
		para.dsl=dsl;
		para.$uid_cukname="null_uid_agentUtype";
 		 
		jsbrj.exe(para,function(data){
			
			console.log(data);
			if(data==1)
			alert("修改成功")
			if(data==0)
			alert("修改失败");
				//$("#content").val(data);
			
		});
			//mycallJava("submitx",$("#title").val(),$("#content").val(),dropIds);
		}catch(e)
		{
			alert(e);
		}
		
	}
	

	function isNullStr(val)
	{
		
		if(val=="")return true;else
		return false;
	}
	$.dialog=window;
	
		$("#uid").val(uid_cur);
		
	var index=	UrlParm.parm('index') 
	if(index)
	    $("#index_a").attr("href",index);
	//	var index_a_href=$("#index_a").attr("href");
		

</script>

	</body>
</html>
